using UnityEditor;


[CustomEditor(typeof(TriggerTest))]
    public class TriggerTestEditor : Editor
    {
        public override void OnInspectorGUI()
        {
            var t = target as TriggerTest;
            if (t && t.trigger)
            {
                EditorGUI.BeginDisabledGroup(true);
                EditorGUILayout.ObjectField("Trigger Attached", t.trigger, typeof(Trigger), false);
                EditorGUI.EndDisabledGroup();
            }
            else
            {
                EditorGUILayout.HelpBox("No trigger is attached to this object", MessageType.Info);
            }
        }
    }